<?php

return [
    // 认证相关
    'auth.login' => ['method' => 'post', 'url' => 'login', 'uses' => 'AuthController@login', 'middleware' => ['log'], 'desc' => '登录'],
    'auth.logout' => ['method' => 'post', 'url' => 'logout', 'uses' => 'AuthController@logout', 'middleware' => ['log'], 'desc' => '登出'],
    'auth.me' => ['method' => 'get', 'url' => 'me', 'uses' => 'AuthController@me', 'middleware' => ['auth'], 'desc' => '获取当前用户信息'],
    'auth.refresh' => ['method' => 'post', 'url' => 'refresh', 'uses' => 'AuthController@refresh', 'middleware' => ['auth'], 'desc' => '刷新令牌'],
    'auth.changepassword' => ['method' => 'post', 'url' => 'change-password', 'uses' => 'AuthController@changePassword', 'middleware' => ['auth', 'log'], 'desc' => '修改密码'],

    // 首页相关路由
    'home.dashboard' => ['method' => 'get', 'url' => 'home/dashboard', 'uses' => 'HomeController@dashboard', 'middleware' => ['auth', 'log'], 'desc' => '获取首页分析数据'],

    // 下拉框相关路由
    'combo.modules' => ['method' => 'get', 'url' => 'combo/modules', 'uses' => 'ComboController@modules', 'middleware' => ['auth'], 'desc' => '获取模块下拉框数据'],
    'combo.roles' => ['method' => 'get', 'url' => 'combo/roles', 'uses' => 'ComboController@roles', 'middleware' => ['auth'], 'desc' => '获取角色下拉框数据'],

    // 管理员相关路由
    'admins.list' => ['method' => 'get', 'url' => 'admins', 'uses' => 'AdminsController@list', 'middleware' => ['auth', 'permission', 'log'], 'desc' => '管理员列表'],
    'admins.view' => ['method' => 'get', 'url' => 'admins/{id}', 'uses' => 'AdminsController@view', 'middleware' => ['auth', 'permission', 'log'], 'desc' => '管理员详情'],
    'admins.create' => ['method' => 'post', 'url' => 'admins', 'uses' => 'AdminsController@create', 'middleware' => ['auth', 'permission', 'log'], 'desc' => '创建管理员'],
    'admins.update' => ['method' => 'put', 'url' => 'admins/{id}', 'uses' => 'AdminsController@update', 'middleware' => ['auth', 'permission', 'log'], 'desc' => '更新管理员'],
    'admins.delete' => ['method' => 'delete', 'url' => 'admins/{id}', 'uses' => 'AdminsController@delete', 'middleware' => ['auth', 'permission', 'log'], 'desc' => '删除管理员'],
    'admins.updatestatus' => ['method' => 'put', 'url' => 'admins/{id}/status', 'uses' => 'AdminsController@updateStatus', 'middleware' => ['auth', 'permission', 'log'], 'desc' => '更新管理员状态'],

    // 权限相关路由
    'permission.list' => ['method' => 'get', 'url' => 'permissions', 'uses' => 'PermissionController@list', 'middleware' => ['auth', 'permission', 'log'], 'desc' => '权限列表'],
    'permission.grouped' => ['method' => 'get', 'url' => 'permissions/grouped', 'uses' => 'PermissionController@grouped', 'middleware' => ['auth'], 'desc' => '分组权限列表'],
    'permission.view' => ['method' => 'get', 'url' => 'permissions/{id}', 'uses' => 'PermissionController@view', 'middleware' => ['auth', 'permission', 'log'], 'desc' => '权限详情'],
    'permission.create' => ['method' => 'post', 'url' => 'permissions', 'uses' => 'PermissionController@create', 'middleware' => ['auth', 'permission', 'log'], 'desc' => '创建权限'],
    'permission.update' => ['method' => 'put', 'url' => 'permissions/{id}', 'uses' => 'PermissionController@update', 'middleware' => ['auth', 'permission', 'log'], 'desc' => '更新权限'],
    'permission.delete' => ['method' => 'delete', 'url' => 'permissions/{id}', 'uses' => 'PermissionController@delete', 'middleware' => ['auth', 'permission', 'log'], 'desc' => '删除权限'],
    'permission.generate' => ['method' => 'post', 'url' => 'permissions/generate', 'uses' => 'PermissionController@generate', 'middleware' => ['auth', 'permission', 'log'], 'desc' => '生成权限'],

    // 角色相关路由
    'role.list' => ['method' => 'get', 'url' => 'roles', 'uses' => 'RoleController@list', 'middleware' => ['auth', 'permission', 'log'], 'desc' => '角色列表'],
    'role.view' => ['method' => 'get', 'url' => 'roles/{id}', 'uses' => 'RoleController@view', 'middleware' => ['auth', 'permission', 'log'], 'desc' => '角色详情'],
    'role.create' => ['method' => 'post', 'url' => 'roles', 'uses' => 'RoleController@create', 'middleware' => ['auth', 'permission', 'log'], 'desc' => '创建角色'],
    'role.update' => ['method' => 'put', 'url' => 'roles/{id}', 'uses' => 'RoleController@update', 'middleware' => ['auth', 'permission', 'log'], 'desc' => '更新角色'],
    'role.delete' => ['method' => 'delete', 'url' => 'roles/{id}', 'uses' => 'RoleController@delete', 'middleware' => ['auth', 'permission', 'log'], 'desc' => '删除角色'],
    'role.updatestatus' => ['method' => 'put', 'url' => 'roles/{id}/status', 'uses' => 'RoleController@updateStatus', 'middleware' => ['auth', 'permission', 'log'], 'desc' => '更新角色状态'],

    // 用户相关路由
    'user.list' => ['method' => 'get', 'url' => 'users', 'uses' => 'UserController@list', 'middleware' => ['auth', 'permission', 'log'], 'desc' => '用户列表'],
    'user.view' => ['method' => 'get', 'url' => 'users/{id}', 'uses' => 'UserController@view', 'middleware' => ['auth', 'permission', 'log'], 'desc' => '用户详情'],
    'user.create' => ['method' => 'post', 'url' => 'users', 'uses' => 'UserController@create', 'middleware' => ['auth', 'permission', 'log'], 'desc' => '创建用户'],
    'user.update' => ['method' => 'put', 'url' => 'users/{id}', 'uses' => 'UserController@update', 'middleware' => ['auth', 'permission', 'log'], 'desc' => '更新用户'],
    'user.delete' => ['method' => 'delete', 'url' => 'users/{id}', 'uses' => 'UserController@delete', 'middleware' => ['auth', 'permission', 'log'], 'desc' => '删除用户'],
    'user.updatestatus' => ['method' => 'put', 'url' => 'users/{id}/status', 'uses' => 'UserController@updateStatus', 'middleware' => ['auth', 'permission', 'log'], 'desc' => '更新用户状态'],

    // 文件上传相关路由
    'upload.image' => ['method' => 'post', 'url' => 'upload/image', 'uses' => 'UploadController@uploadImage', 'middleware' => ['auth'], 'desc' => '上传图片'],
    'upload.file' => ['method' => 'post', 'url' => 'upload/file', 'uses' => 'UploadController@uploadFile', 'middleware' => ['auth'], 'desc' => '上传文件'],
    'upload.coscredentials' => ['method' => 'post', 'url' => 'upload/cos-credentials', 'uses' => 'UploadController@getCosCredentials', 'middleware' => ['auth', 'log'], 'desc' => '获取COS临时凭证'],
    
    // 消息通知相关路由
    'notice.unreadlist' => ['method' => 'get', 'url' => 'notices/unread', 'uses' => 'NoticeController@unreadList', 'middleware' => ['auth'], 'desc' => '获取未读消息列表'],
    'notice.markasread' => ['method' => 'put', 'url' => 'notices/{id}/mark-as-read', 'uses' => 'NoticeController@markAsRead', 'middleware' => ['auth', 'log'], 'desc' => '标记消息为已读'],
    'notice.markmultipleasread' => ['method' => 'put', 'url' => 'notices/mark-multiple-as-read', 'uses' => 'NoticeController@markMultipleAsRead', 'middleware' => ['auth', 'log'], 'desc' => '批量标记消息为已读'],
];
